package fristphase.day02;

import java.util.Scanner;

public class 三角形 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入要生成几行的三角形：");
        int line = scanner.nextInt();
        for(int i=line-1;i>=0;i--){
            int emptyTimes = i;
            int contentTimes = (line-i)*2-1;
            for (int g=0;g<emptyTimes;g++){
                System.out.print(" ");
            }
            for (int g=0;g<contentTimes;g++){
                System.out.print("*");
            }
            System.out.println("");
        }
    }
}
